﻿@{
    Utilities.ViewModel.TipModel tip = null;
    if (TempData["Tip"]!=null)
    {
        tip = TempData["Tip"] as Utilities.ViewModel.TipModel;
    }
    }
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <meta http-equiv="X-UA-Compatible" content="IE=edge" >@*ie浏览器文本模式最新，可以ie=8,ie=7等*@
    <title>@ViewBag.Title</title>
    <link href="~/Content/newadmin/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/newadmin/css/common.css" rel="stylesheet" />
     <!--[if lte IE 6]>
  
    <link href="~/Content/newadmin/css/bootstrap-ie6.min.css" rel="stylesheet" />
    <link href="~/Content/newadmin/css/ie.css" rel="stylesheet" />
      <![endif]-->
    @RenderSection("css", false)
</head>
<body>
    <div class="container" style="width:1170px">
        @Html.Partial("_Top")
        <div class="row-fluid">
            <div class="span3">
                @Html.Partial("_Sidebar")
            </div>
            <div class="span9">
                <ul class="breadcrumb">
                    <li><a href="@Url.Action("index", "home")">首页</a> <span class="divider">/</span></li>
                    @RenderSection("navigation", false)@*导航*@
                    <li class="active">@ViewBag.Title</li>
                </ul>
                @if (tip != null)
                {
                    switch (tip.Type)
                    {
                        case 1:
                    <div class="alert alert-success">
                        <a class="close" data-dismiss="alert">×</a>
                        @tip.Content
                    </div>
                            break;
                            case 0:
                    <div class="alert">
                        <a class="close" data-dismiss="alert">×</a>
                        @tip.Content
                    </div>
                            break;
                        default:
                            break;
                    }
                }
               
                @RenderBody()
            </div>
        </div>
    </div>


    <script type="text/javascript" src="~/Scripts/jquery-1.8.3.min.js"></script>

    <script type="text/javascript">
        sidebar("@ViewBag.SidebarId");
        //要显示的a的id号，不需要加sidebar-
        function sidebar(tabhref) {
            tabhref = "sidebar-" + tabhref;
            //当前选中项
            var tab = $("#" + tabhref);
            //所有子ul
            var childuls = $("#accordion3 li ul");
            //所有存在子ul的同级a标记
            var hrchilds = $("#accordion3>li:has(ul)>a");
            //选中项添加样式
            tab.parent().addClass("active");
            if (tab.parents("li").length > 1) {
                tab.parent().parent().addClass("in")//.parent().addClass("active");
            }
            //===============存在子标签
            $("<i class=\"icon-chevron-right\"></i>").appendTo(hrchilds);//添加箭头

        }
    </script>
    <script src="~/Content/newadmin/js/bootstrap.min.js"></script>
     @RenderSection("scripts", false)
    <script type="text/javascript">
        $(function () {
            @RenderSection("loadend", false)
        })
    </script>
   <!-- bsie js 补丁只在IE6中才执行 -->  
    <!--[if lte IE 6]>
  
    <script src="~/Content/newadmin/js/bootstrap-ie.js"></script>
  <![endif]-->
   
</body>
</html>
